package com.ming.multifunction.model.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * '评论'
 * @TableName comment
 */
@TableName(value ="comment")
@Data
public class Comment implements Serializable {
    /**
     * '评论内容id'
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id")
    private Long id;


    /**
     * 用户id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "user_id")
    private Long user_id;


    /**
     * '评论内容'
     */
    @TableField(value = "content")
    private String content;

    /**
     * '贴子ID'
     */
    @TableField(value = "postId")
    private Long postId;

    /**
     * '父级评论id'
     */
    @TableField(value = "parentID")
    private Long parentID;

    /**
     * 回复对象名称
     */
    @TableField(value = "target")
    private String target;

    /**
     * '创建时间'
     */
    @TableField(value = "createTime")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date createTime;

    /**
     * 
     */
    @TableField(value = "updateTime")
    private Date updateTime;

    /**
     * '是否删除'
     */
    @TableField(value = "isDelete")
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}